{
  "properties" : { },
  "id" : "bcef353ada274aca913e92d2840643db",
  "script" : null,
  "groupId" : "fe43a82bf35d4dc8830b340876318d17",
  "name" : "同步",
  "createTime" : 1727071171379,
  "updateTime" : 1725505027933,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "synchronization",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {}\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : null,
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "status",
      "value" : "200",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : null,
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
List deviceList = db.table('ndmp_device').select();
        List commandList = db.table('ndmp_net_device_command').select();
        ArrayList arrayList = new ArrayList ();
        for ( command in commandList) {
            arrayList.add(command.id);
        }
        ArrayList commands = new ArrayList ();
        for (device in deviceList) {
            if (!arrayList.contains(device.id)) {
                var netDeviceCommand = {
                    "id":device.id,
                    "deviceType":device.deviceType==null?-1:device.deviceType,
                    "deviceModelId":device.deviceModelId,
                    "deviceModel":device.deviceModel,
                    "deviceName":device.deviceName,
                    "ip":device.ip,
                    "netRegion":device.netRegion
                }
                commands.add(netDeviceCommand);
            }
        }
        if(commands.size()==0){
            return null;
        }

     return  db.table('ndmp_net_device_command').batchInsert(commands);
